package com.bu.web;

import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;

import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

/**
 * @author xueqiang.mi
 * @since 2011-2-22
 */
@Path("/topic")
@Component
@Scope(BeanDefinition.SCOPE_SINGLETON)
public class TopicResource extends BaseResource {

	@GET
	@Path("crt")
	@Produces("text/plain")
	public String search(@QueryParam("name") String name) {
		topicService.getOrCreate(name);
		return "OK";
	}
}
